package com.introduce.extract;




public class Customer implements Nullable {


    private String name;

    public BillingPlan billingPlan;

    PaymentHistory paymentHistory;

    public String getName() {
        return this.name;
    }

    public BillingPlan getPlan() {
        return billingPlan;
    }

    public PaymentHistory getHistory() {
        return paymentHistory;
    }

    public Customer() {
    }

    public Customer(String name, BillingPlan billingPlan, PaymentHistory paymentHistory) {
        this.name = name;
        this.billingPlan = billingPlan;
        this.paymentHistory = paymentHistory;
    }

    /**
     * 工厂函数 专门用来创建NullCustomer 对象
     *
     * @return
     */
    public static Customer newNull() {
        return new NullCustomer();
    }

    @Override
    public boolean isNull() {
        return false;
    }
}
